home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Business Assistant
/
Business Assistant.iso
/
acctg
/
tonyray1
/
bill.prg
< prev
next >
Wrap
Text File
|
1985-10-23
|
6KB
|
293 lines
SET DEVI TO PRINT
line=1
MNAME='ROBERT A. RAY,P.C.'
POS=40-LEN(TRIM(MNAME))/2
@ 01,POS SAY MNAME
MADDRESS='P.O. BOX 614,423 S. SPRING'
POS=40-LEN(TRIM(MADDRESS))/2
@ 02,POS SAY MADDRESS
MCITY='TYLER,TEXAS 75710'
POS=40-LEN(TRIM(MCITY))/2
@ 03,POS SAY MCITY
@ 04,38 say '* * *'
mphone='214-593-2020'
pos=40-len(trim(mphone))/2
@05,pos say mphone
LINE=PROW()+5
FIND '&mfile_nmbr'
@line,04 say clientname
@line,51 say 'File number - RAR'+file_nmbr
@line+1,04 say cstreet
@line+1,57 say 'Ref: '+reference
@line+2,04 say ccity_st
@line+2,51 say 'Billing date: '+dtoc(date())
@line+4,04 say 'ATTEN: '+contact
@LINE+6,00 SAY "PREVIOUS MONTH'S BALANCE"
@LINE+6,65 SAY '$'
@line+6,66 say str(prev_bal,8,2)
MCODE=CODE
sele SERVICE
FIND '&mfile_nmbr'
line=prow()+3
@LINE,00 SAY 'DATE'
@line,11 say 'PROFESSIONAL SERVICES RENDERED'
line=prow()+2
IF EOF()
@LINE,12 say '(NO BILLABLE TIME THIS MONTH)'
TOTALSER=0.00
MSERCOUNT=0
ELSE
MSERCOUNT=0
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='SER'
MSERCOUNT=MSERCOUNT+1
ENDI
SKIP
ENDD
IF MSERCOUNT=0
@LINE,12 SAY '(NO BILLABLE TIME THIS MONTH)'
ENDI
IF MSERCOUNT<=10 .AND. MSERCOUNT>0
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='SER'
@ line,00 say DTOC(date)+' - '+second
line=line+1
SKIP
ELSE
SKIP
ENDI
ENDD
ENDI
IF MSERCOUNT>10
@ LINE,12 SAY '(SEE ATTACHED LIST)'
ENDI
IF MCODE='5'
TOTALSER=0.00
ELSE
TOTALSER=0.00
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='SER'
TOTALSER=TOTALSER+AMOUNT
SKIP
ELSE
SKIP
ENDI
ENDD
ENDI
ENDI
line=prow()+2
@line,00 SAY 'TOTAL FOR THE ABOVE SERVICES'
@line,65 SAY '$'
@line,66 SAY str(TOTALSER,8,2)
line=prow()+2
@line,00 SAY 'DATE OUT OF POCKET EXPENSES'+
LINE=PROW()+2
FIND '&MFILE_NMBR'
IF EOF()
@LINE,12 say '(NO BILLABLE EXPENSES THIS MONTH)'
TOTALEXP=0.00
MEXPCOUNT=0
ELSE
MEXPCOUNT=0
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='EXP'
MEXPCOUNT=MEXPCOUNT+1
SKIP
ELSE
SKIP
ENDI
ENDD
IF MEXPCOUNT=0
@LINE,12 SAY '(NO BILLABLE EXPENSES THIS MONTH)'
ENDI
IF MEXPCOUNT<=05 .AND. MEXPCOUNT>0
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='EXP'
@ line,00 say DTOC(date)+' - '+second
line=line+1
SKIP
ELSE
SKIP
ENDI
ENDD
ENDI
IF MEXPCOUNT>5
@ LINE,12 SAY '(SEE ATTACHED LIST)'
ENDI
TOTALEXP=0.00
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='EXP'
TOTALEXP=TOTALEXP+AMOUNT
SKIP
ELSE
SKIP
ENDI
ENDD
ENDI
LINE=PROW()+2
@ LINE,00 SAY 'TOTAL FOR THE ABOVE EXPENSES'
@ LINE,65 SAY '$'
@ LINE,66 SAY str(TOTALEXP,8,2)
LINE=PROW()+2
SELE CURRENT
@LINE,56 SAY 'TOTAL'
@LINE,65 SAY '$'
mstr3=prev_bal+totalser+totalexp
@LINE,66 SAY str(mstr3,8,2)
LINE=PROW()+2
@ LINE,40 SAY 'PAYMENT RECEIVED'
SELE SERVICE
FIND '&MFILE_NMBR'
LINE=PROW()+2
IF EOF()
@LINE,40 SAY '(NO PAYMENT RECEIVED)'
TOTALPAY=0.00
MPAYCOUNT=0
ELSE
MPAYCOUNT=0
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='PAY'
MPAYCOUNT=MPAYCOUNT+1
SKIP
ELSE
SKIP
ENDI
ENDD
IF MPAYCOUNT=0
@LINE,40 SAY '(NO PAYMENT RECEIVED)'
ENDI
IF MPAYCOUNT<=03 .AND. MPAYCOUNT>0
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='PAY'
@LINE,40 SAY DTOC(DATE)+' - '+'$'
@LINE,PCOL()+1 SAY str(AMOUNT,8,2)
LINE=LINE+1
SKIP
ELSE
SKIP
ENDI
ENDD
ENDI
IF MPAYCOUNT>3
@ LINE,40 SAY '(SEE ATTACHED)'
ENDI
LINE=PROW()+2
@LINE,40 SAY 'TOTAL PAYMENTS'
TOTALPAY=0.00
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='PAY'
TOTALPAY=TOTALPAY+AMOUNT
SKIP
ELSE
SKIP
ENDI
ENDD
ENDI
@LINE,65 SAY '$'
@LINE,66 SAY str(TOTALPAY,8,2)
SELE CURRENT
REPL SER_BAL WITH TOTALSER,EXP_BAL WITH TOTALEXP
REPL PAY_BAL WITH TOTALPAY
IF hold
REPL prev_bal with totalexp-totalpay
ELSE
IF totalser<begin_bal
REPL prev_bal with (begin_bal+totalexp)-totalpay
ELSE
REPL prev_bal with (totalser+totalexp)-totalpay
ENDI
ENDI
LINE=PROW()+2
@ LINE,50 SAY 'AMOUNT DUE'
@ LINE,65 SAY '$'
@ LINE,66 SAY str(PREV_BAL,8,2)
IF Prev_bal<0
@line,75 say 'CR'
ENDI
MFOOTER1='NOTE: LEGAL FEES ARE CHARGED AS A COURTESY AND ARE'
MFOOTER2='DUE-NO LATER THAN-THE 10TH OF THE MONTH'
POS=40-LEN(TRIM(MFOOTER1))/2
POS=40-LEN(TRIM(MFOOTER2))/2
@60,POS SAY MFOOTER2
IF MSERCOUNT>10 .OR. MEXPCOUNT>5 .OR. MPAYCOUNT>3
EJEC
LINE=01
IF MSERCOUNT>10
SELE SERVICE
LINE=LINE+2
@LINE,00 SAY 'DATE PROFESSIONAL SERVICES RENDERED'
LINE=5
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='SER'
@LINE,00 SAY DTOC(DATE)+' - '+SECOND
SKIP
LINE=LINE+1
IF LINE>=56
EJEC
LINE=01
ENDI
ELSE
SKIP
ENDI
ENDD
ENDI
LINE=PROW()+2
IF MEXPCOUNT>5
SELE SERVICE
@LINE,00 SAY 'DATE EXPENSES'
LINE=LINE+2
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='EXP'
@LINE,00 SAY DTOC(DATE)+' - '+SECOND
SKIP
LINE=LINE+1
IF LINE>=56
EJEC
LINE=01
ENDI
ELSE
SKIP
ENDI
ENDD
ENDI
LINE=PROW()+2
IF MPAYCOUNT>3
SELE SERVICE
@LINE,00 SAY 'DATE PAYMENT'
LINE=LINE+2
FIND '&MFILE_NMBR'
DO WHIL FILE_NMBR='&MFILE_NMBR' .and. .not. eof()
IF KIND='PAY'
@LINE,00 SAY DTOC(DATE)+' - '
@LINE,12 SAY AMOUNT
SKIP
LINE=LINE+1
IF LINE>=56
EJEC
LINE=01
ENDI
ELSE
SKIP
ENDI
ENDD
ENDI
ENDI
SET PRIN ON
EJEC
SET PRIN OFF
CLEA
SET DEVI TO SCREEN
CLEA
RETU